FROM openshift/base-rhel8:v4.10.0-202202160023.p0.gf17f552.assembly.stream
ENV __doozer=update BUILD_RELEASE=202202241648.p0.g2004c66.assembly.stream BUILD_VERSION=v4.10.0 OS_GIT_MAJOR=4 OS_GIT_MINOR=10 OS_GIT_PATCH=0 OS_GIT_TREE_STATE=clean OS_GIT_VERSION=4.10.0-202202241648.p0.g2004c66.assembly.stream SOURCE_GIT_TREE_STATE=clean 
ENV __doozer=merge OS_GIT_COMMIT=2004c66 OS_GIT_VERSION=4.10.0-202202241648.p0.g2004c66.assembly.stream-2004c66 SOURCE_DATE_EPOCH=1642831088 SOURCE_GIT_COMMIT=2004c66bc93bd3a9189ed771835d3a0acaedaebc SOURCE_GIT_TAG=2004c66 SOURCE_GIT_URL=https://github.com/openshift/ironic-agent-image 

ENV PKGS_LIST=packages-list.ocp
ARG EXTRA_PKGS_LIST
ARG PATCH_LIST

COPY ${PKGS_LIST}* ${EXTRA_PKGS_LIST:-$PKGS_LIST} ${PATCH_LIST:-$PKGS_LIST} /tmp/
COPY prepare-image.sh patch-image.sh /bin/

RUN prepare-image.sh && \
  mkdir -p /etc/ironic-python-agent && \
  rm -f /bin/prepare-image.sh

COPY hardware_manager /tmp/hardware_manager

RUN PBR_VERSION=1.0 pip3 install --no-index --verbose --prefix=/usr /tmp/hardware_manager

COPY ironic-python-agent.conf /etc/ironic-python-agent/00-defaults.conf

ENTRYPOINT ["ironic-python-agent", "--config-dir", "/etc/ironic-python-agent"]

LABEL \
        name="openshift/ose-ironic-agent" \
        com.redhat.component="ironic-agent-container" \
        io.openshift.maintainer.product="OpenShift Container Platform" \
        io.openshift.maintainer.component="Bare Metal Hardware Provisioning" \
        io.openshift.maintainer.subcomponent="ironic" \
        release="202202241648.p0.g2004c66.assembly.stream" \
        io.openshift.build.commit.id="2004c66bc93bd3a9189ed771835d3a0acaedaebc" \
        io.openshift.build.source-location="https://github.com/openshift/ironic-agent-image" \
        io.openshift.build.commit.url="https://github.com/openshift/ironic-agent-image/commit/2004c66bc93bd3a9189ed771835d3a0acaedaebc" \
        version="v4.10.0"

